import BasicLayout from "@console/layouts/BasicLayout.vue";
import { IconFolder } from "@halo-dev/components";
import { definePlugin } from "@halo-dev/console-shared";
import { markRaw } from "vue";
import HomePage from "./HomePage.vue";
import ProductsPage from "./ProductsPage.vue";
import AboutPage from "./AboutPage.vue";
import NewsPage from "./NewsPage.vue";
import ServicePage from "./ServicePage.vue";
import ContactPage from "./ContactPage.vue";

export default definePlugin({
  routes: [
    {
      path: "/website",
      name: "WebsiteRoot",
      component: BasicLayout,
      meta: {
        title: "企业网站",
        searchable: true,
        permissions: ["system:website:view"],
        menu: {
          name: "企业网站",
          group: "content",
          icon: markRaw(IconFolder),
          priority: 5,
          mobile: true,
        },
      },
      children: [
        {
          path: "",
          name: "WebsiteHome",
          component: HomePage,
          meta: {
            title: "首页",
          },
        },
        {
          path: "products",
          name: "WebsiteProducts",
          component: ProductsPage,
          meta: {
            title: "产品中心",
          },
        },
        {
          path: "about",
          name: "WebsiteAbout",
          component: AboutPage,
          meta: {
            title: "关于我们",
          },
        },
        {
          path: "news",
          name: "WebsiteNews",
          component: NewsPage,
          meta: {
            title: "新闻资讯",
          },
        },
        {
          path: "service",
          name: "WebsiteService",
          component: ServicePage,
          meta: {
            title: "服务支持",
          },
        },
        {
          path: "contact",
          name: "WebsiteContact",
          component: ContactPage,
          meta: {
            title: "联系我们",
          },
        },
      ],
    },
  ],
});